<template>
	<div class="app">
		<!-- 指定组件呈现的位置 -->
		<router-view></router-view>
		<FooterNav v-show="$root.footer"></FooterNav>
		<!-- 导航区域 -->
	</div>
</template>

<script>
import FooterNav from './components/FooterNav.vue'
export default{
	name:"app",
	components:{
		FooterNav
	},
	watch:{
	      $route:{
	        handler(value){
	          let path = value.path;
	          if(/home|my|shopp|sort|user/.test(path))  this.$root.footer = true;
	          if(/details/.test(path))this.$root.footer = false;
	        },
	        immediate:true
	      }
	    }
}
</script>

<style>
.app{
	display: flex;
	flex-direction: column;
	height: 100%;
}
</style>
